package kr.ac.hansung.www;

import java.io.Serializable;
import java.util.ArrayList;
import com.multitrack.convert.GPX;
import com.multitrack.convert.KML;

public class GPSManager implements GPX, KML, Serializable {

	private static final long serialVersionUID = 367516137228131388L;
	private ArrayList<GPS> log;

	public GPSManager() {
		this.log = new ArrayList<GPS>();
	}

	GPSManager(ArrayList<GPS> list) {
		this.log = list;
	}

	public ArrayList<GPS> getGPSArrayList() {
		return this.log;
	}

	public void add(GPS gps) {
		this.log.add(gps);
	}

	public void add(double latitude, double longitude, long time) {
		log.add(new GPS(latitude, longitude, time));

	}

	public GPS getLastGPS() {
		return log.get(log.size() - 1);
	}

	public void reset() {
		this.log.clear();
	}

	public int count() {
		return this.log.size();
	}

	public String toGpxString() {
		// TODO Auto-generated method stub
		return null;
	}

	public String toKmlString() {
		// TODO Auto-generated method stub
		return null;
	}

}
